package com.xh.bussiness.tiku.bean.request;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.xh.bussiness.tiku.bean.dto.QuestionDto;
import com.xh.bussiness.tiku.model.QuestionChapterKnowledge;
import com.xh.bussiness.tiku.model.QuestionSource;
import com.xh.core.bean.BaseRequestBean;
import com.xh.core.convert.JSONConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 试题表 查询bean
 * </p>
 *
 * @author daiwei
 * @since 2019-01-14
 */
@ApiModel(value = "QuestionSaveRequest", description = "试题保存参数对象")
@Data
public class QuestionSaveRequest extends BaseRequestBean {

    /**
     * id
     */
    @ApiModelProperty(value = "id",dataType = "String", required = false)
    private String id;
    /**
     * 题干
     */
    @ApiModelProperty(value = "题干",notes ="试题题干" ,dataType = "String", required = false)
    private String title;
    /**
     * 题目类型
     */
    @ApiModelProperty(value = "题目类型名称",dataType = "String", required = false)
    private String typeName;
    /**
     * 科目
     */
    @ApiModelProperty(value = "科目id",notes ="科目id" ,dataType = "String", required = true)
    private String subjectId;
    /**
     * 省id
     */
    @ApiModelProperty(value = "省id",notes ="省id" ,dataType = "String")
    private String proviceId;

    /**
     * 市id
     */
    @ApiModelProperty(value = "市id",notes ="市id" ,dataType = "String")
    private String cityId;

    /**
     * 区id
     */
    @ApiModelProperty(value = "区id",notes ="区id" ,dataType = "String")
    private String districtId;
    /**
     * 知识点
     */
    @ApiModelProperty(value = "知识点集合",notes ="知识点集合" ,dataType = "String[]", required = true)
    private List<String> knowledgePoints;

    /**
     * 题型
     */
    @ApiModelProperty(value = "题型",notes ="题型" ,dataType = "Integer", required = true)
    private Integer type;
    /**
     * 难度
     */
    @ApiModelProperty(value = "难度",notes ="难度" ,dataType = "Integer", required = false)
    private Integer difficult;
    /**
     * 年段id
     */
    @ApiModelProperty(value = "年段",notes ="年段" ,dataType = "Integer", required = true)
    private String gradeRangeId;

    /**
     * 年级id
     */
    @ApiModelProperty(value = "年级",notes ="年级" ,dataType = "Integer", required = true)
    private String gradeId;

    /**
     * 类别：真题、模拟题等
     */
    @ApiModelProperty(value = "类别",notes ="类别" ,dataType = "String", required = false)
    private String category;

    /**
     * 年份
     */
    @ApiModelProperty(value = "年份",notes ="年份" ,dataType = "String", required = false)
    private String year;

    /**
     * 标签，以分号分隔
     */
    @ApiModelProperty(value = "标签",notes ="标签" ,dataType = "String", required = false)
    private String labels;

    /**
     * 来源
     */
    @ApiModelProperty(value = "来源",notes ="来源" ,dataType = "String", required = false)
    private String source;
    /**
     * 正确答案
     */
    @ApiModelProperty(value = "正确答案",notes ="正确答案" ,dataType = "String", required = false)
    @JsonDeserialize(using = JSONConverter.class)
    private JSON rightAnswer;

    @ApiModelProperty(value = "正确答案内容",notes ="正确答案内容" ,dataType = "String")
    private String answer;

    /**
     * 解析
     */
    @ApiModelProperty(value = "解析",notes ="解析" ,dataType = "String", required = false)
    private String analysis;

    /**
     * 付费解析
     */
    @ApiModelProperty(value = "付费解析",notes ="付费解析" ,dataType = "String", required = false)
    private String analysisPay;

    /**
     * 考点分析
     */
    @ApiModelProperty(value = "考点分析",notes ="考点分析" ,dataType = "String", required = false)
    private String examPoint;

    /**
     * 视频解析
     */
    @ApiModelProperty(value = "视频解析",notes ="视频解析" ,dataType = "String", required = false)
    private String analysisVideo;

    /**
     * 选项JSON
     */
    @ApiModelProperty(value = "选项JSON",notes ="选项JSON" ,dataType = "JSON", required = false)
    @JsonDeserialize(using = JSONConverter.class)
    private JSON option;
    
    /**
     * 题目来源，1 自建，2 word导入
     */
    @ApiModelProperty(value = "题目来源，1 自建，2 word导入",notes ="题目来源，1 自建，2 word导入" ,dataType = "int", required = false)
    private Integer from;
    
    /**
     * 菁优网传过来的试题id
     */
    @ApiModelProperty(value = "菁优网传过来的试题id",notes ="菁优网传过来的试题id" ,dataType = "String", required = false)
    private String refId;
    
    @ApiModelProperty(value = "题干类型，1文本 2、图片",notes ="题干类型，1文本 2、图片" ,dataType = "int", required = false)
    private Integer contentType;

    /**
     * 拍照错题照片路径
     */
    @ApiModelProperty(value = "拍照错题照片路径",notes ="拍照错题照片路径" ,dataType = "String", required = false)
    private String imgPath;

    @ApiModelProperty("题目html")
    private String questionHtml;

    @ApiModelProperty("tool题目类型")
    private Integer basicQuestionType;

    @ApiModelProperty("试题来源")
    private List<QuestionSource> questionSources;

    @ApiModelProperty("试题章节知识点关系")
    private List<QuestionChapterKnowledge> chapterKnowles;

    @ApiModelProperty("操作来源：1:题库单题编辑，2：设置标签编辑")
    private Integer operationType;

    @ApiModelProperty("题型名称")
    private String questionTypeName;

    @ApiModelProperty("排列方式：1:每行一个选项；2:每行两个选项 3:每行4个选项")
    private Integer optionArrangements;

    private List<QuestionDto> childs;

    /**
     * 视频
     **/
    private String videoPath;

    /**
     * 无声视频
     **/
    private String silentVideoPath;

    /**
     * 音频
     **/
    private String voicePath;
}
